FROM php:7.2-fpm-alpine3.11
# 添加阿里云源，不然很慢的
RUN echo https://mirrors.aliyun.com/alpine/v3.11/main > /etc/apk/repositories && \
echo https://mirrors.aliyun.com/alpine/v3.11/community >> /etc/apk/repositories
RUN apk update && apk upgrade
# mysql 扩展
RUN docker-php-ext-install pdo_mysql
# redis 扩展
RUN apk add autoconf gcc g++ make
RUN pecl install redis-4.0.1 && docker-php-ext-enable redis
# swoole 扩展
RUN apk add autoconf openssl openssl-dev
RUN pecl install swoole && docker-php-ext-enable swoole